{% load static %}
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>学生选课系统-主页</title>
    <link rel="stylesheet" href="{% static  "bootstrap3/css/bootstrap.min.css" %}">
    <link rel="stylesheet" href="{% static "bootstrap3/css/bootstrap-theme.min.css" %}">
    <link rel="stylesheet" href="{% static "css/xsxk.css" %}">
    <style type="text/css">
        .navbar-inverse {
            background-color: #337ab7;
            border-color: #337ab7;
        }
    </style>
    <script src="{% static "bootstrap3/js/jquery-1.11.2.min.js" %}"></script>
    <script src="{% static "bootstrap3/js/bootstrap.min.js" %}"></script>
</head>
<body>

<div class="container">

    <div class="row">
        <div class="col-md-12">
            <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="container">
                    <div class="navbar-header">
                        <a class="navbar-brand " href="#">学生选课系统</a>
                    </div>
                    <div id="navbar" class="navbar-right">
                        <a class="navbar-brand" href="#">当前用户：{{ user.userName }}</a>
                    </div>
                </div>
            </nav>
        </div>
    </div>

    <div class="row" style="padding-top: 45px;">
        <div class="col-md-3">
            <script type="text/javascript">
                function logout() {
                    if (confirm('您确定要退出系统吗？')) {
                        window.location.href = "../login";
                    }
                }
            </script>
            <div class="list-group">
                <a href="#" class="list-group-item active">
                    系统菜单
                </a>
                {% if userType == "管理员" %}
                    <a href="../main/manager_student_info" class="list-group-item">学生信息管理</a>
                    <a href="../main/manager_teacher_info" class="list-group-item">教师信息管理</a>
                    <a href="../main/manager_course_info" class="list-group-item">课程信息管理</a>
                    <a href="javascript:logout()" class="list-group-item">安全退出</a>
                {% endif %}
                {% if userType == "老师" %}
                    <a href="../main/teacher_showCourse" class="list-group-item">查看课程</a>
                    <a href="../main/teacher_showStudent" class="list-group-item">查看学生</a>
                    <a href="../main/teacher_scoreInfo" class="list-group-item">成绩录入</a>
                    <a href="../main/teacher_showInfo" class="list-group-item">个人信息查看</a>
                    <a href="javascript:logout()" class="list-group-item">安全退出</a>
                {% endif %}
                {% if userType == "学生" %}
                    <a href="../main/student_course_list" class="list-group-item">课程信息查看</a>
                    <a href="../main/student_select_course" class="list-group-item">选择课程</a>
                    <a href="../main/student_showScore" class="list-group-item">成绩查询</a>
                    <a href="../main/student_select_showInfo" class="list-group-item">个人信息查看</a>
                    <a href="javascript:logout()" class="list-group-item">安全退出</a>
                {% endif %}
            </div>
        </div>
        <div class="col-md-9">
            <div>
                <ol class="breadcrumb">
                    <li><span class="glyphicon glyphicon-home"></span>&nbsp;<a
                            href="${pageContext.request.contextPath}/main.jsp">主页</a></li>
                    <li class="active">${modeName }</li>
                </ol>
            </div>
            <div>
                <div class="col-md-6">
                    <form action="../student/student_search" method="post">

                        <div class="input-group" style="width: 300px">
                            <input type="text" class="form-control" name="content" placeholder="请输入要查询的课程名称...">
                            <span class="input-group-btn">
		        <button class="btn btn-default" type="submit"><span
                        class="glyphicon glyphicon-search"></span>&nbsp;查询</button>
		      </span>
                        </div>
                    </form>
                </div>
                <table class="table table-hover  table-bordered table-striped" style="margin-bottom: 0px;">
                    <tr>
                        <th>序号</th>
                        <th>课程名称</th>
                        <th>学分</th>
                        <th>授课老师</th>
                        <th>开始周</th>
                        <th>结束周</th>
                        <th>详情</th>
                    </tr>
                    {% for i in courses %}
                        <tr>
                            <td>{{ i.id }}</td>
                            <td>{{ i.courseName }} </td>
                            <td>{{ i.credit }}</td>
                            <td>{{ i.teacherId.trueName }}</td>
                            <td>{{ i.startTime }}</td>
                            <td>{{ i.endTime }}</td>
                            <td><a href="../info/?data_id=course_{{ i.id }}">点击查看</a></td>

                        </tr>
                    {% endfor %}
                </table>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div align="center" style="padding-top: 200px">
                Copyright © 2013-2015 XXXX 版权所有
            </div>
        </div>
    </div>
</div>
</body>
</html>